package com.zsrt.day20170420.pm.test2;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.junit.Test;

/**
 * @author jzh
 * @创建时间 2017年4月20日下午4:04:57 类说明：
 */
public class MapTest {

	@Test
	public void mapTest(){
		
		Student jmj=new Student("贾梦菊", "女");
		Student zjy=new Student("张嘉源", "男");
		Student lzh=new Student("罗智壕", "男");
		Student hxq=new Student("何小强", "男");
		Student jzh=new Student("靳志辉", "男");
		Student zc =new Student("周驰", "男");
		Student zsh=new Student("曾少华", "男");
		
		
		List<Student> studentList1=new ArrayList<Student>();
		List<Student> studentList2=new ArrayList<Student>();
		List<Student> studentList3=new ArrayList<Student>();
		studentList1.add(jmj);
		studentList1.add(zsh);
		studentList2.add(jzh);
		studentList2.add(zc);
		studentList3.add(zjy);
		studentList3.add(lzh);
		studentList3.add(hxq);
		
		Map<String,List> class1704=new HashMap<String,List>();
		class1704.put("贾梦菊", studentList1);
		class1704.put("靳志辉", studentList2);
		class1704.put("罗智壕", studentList3);
		
		
	
		
		Set<String> keySet = class1704.keySet();
		Iterator<String> iterator = keySet.iterator();
		while(iterator.hasNext()){
			String name = iterator.next();
			List list = class1704.get(name);
			System.out.println("组长："+name+"    组员信息："+class1704.get(name));
			
		}
	}

}
